<template>
    <el-container>
        <el-header>
            <el-col class="headname">商品评论</el-col>
            <el-col class="lianjie">
                <template>
                    <el-tabs v-model="activeName" @tab-click="handleClick" class="tabbottom">
                        <el-tab-pane label="评论显示" name="first" :key="one">
                            <message></message>
                        </el-tab-pane>
                        <el-tab-pane label="评论隐藏" name="second" :key="two">
                            <messnone></messnone>
                        </el-tab-pane>
                    </el-tabs>
                </template>
            </el-col>
        </el-header>
<!--        <el-main>-->
<!--            <router-view></router-view>-->
<!--        </el-main>-->
    </el-container>
</template>
<!--this.$emit("child",'third')-->
<script>
    import message from "./message";
    import messnone from "./messnone";
    export default {
        name: "messagefirst",

        components:{
            message,
            messnone,
        },


        data() {
            return {
                activeName: 'first',
                one:'',
                two:'',
            };
        },
        methods: {
            handleClick(data) {
                // console.log(tab, event);
                // let name=data.name

                // if(name=='first'){
                //     console.log("这是第一页")
                //     // this.one = new Date().getTime()
                //     this.$axios.post('/api/comment/isViewList',).then((res)=>{
                //         console.log(res)
                //         this.tableData=res.data.data
                //     })
                // }else {
                //     console.log("这是第二页")
                //     this.$axios.post('/api/comment/notViewList').then((res)=>{
                //         console.log(res)
                //         this.tableData=res.data.data
                //     })
                // }

            },
            // foo(a){
            //     this.activeName=a
            // }
        }
    }
</script>

<style scoped>
    .headname{
        text-align: left;
        font-size:18px;
        margin: 5px 5px 5px 0;
    }
    .lianjie{
        margin: 8px 8px 10px 0;
    }
</style>